<?php

namespace App\HttpController\Api;

use EasySwoole\Core\Http\AbstractInterface\Controller;

class Upload extends Controller {
	function index() {
		$file = $this->request ()->getUploadedFile ( "file" );
		var_dump ( $file );
		var_dump ( $file->getClientFilename () );
		
		$move = $file->moveTo ( "/var/www/html/Chat/" . $file->getClientFilename () );
		var_dump ( $move );
	}
	function test() {
		$req =  $this->request ()->getRequestParam ();
		$this->response()->write(json_encode($req));
	}
}